<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <title>订单管理</title>
    <meta content="text/html; charset=UTF-8" http-equiv="content-type">
    <style type="text/css">
        body {
            font-family: "微软雅黑";
            background-color: #EDEDED;
        }

        h2 {
            text-align: center;
        }

        table {
            margin: 0 auto;
            text-align: center;
            border-collapse: collapse;
            font-size: 16px;
            width: 90%;
        }

        td, th {
            padding: 7px;
        }

        th {
            background-color: #DCDCDC;
            width: 120px;
        }

        th.order, th.pnum, th.price {
            width: 60px;
        }

        hr {
            margin-bottom: 20px;
            border: 1px solid #aaa;
        }

        #add-order {
            text-align: center;
            font-size: 20px;
        }
    </style>

    <script type="text/javascript">

    </script>
</head>
<body>
<h2>订单管理</h2>
<div id="add-order">
    <a href="#" target="rightFrame" th:href="@{/order/toSave}">新增订单</a>
</div>
<hr/>
<table border="1">
    <tr>
        <th class="order">序号</th>
        <th>订单号</th>
        <th>类型</th>
        <th class="pnum">人数</th>
        <th>收银员</th>
        <th>下单时间</th>
        <th>结账时间</th>
        <th>支付方式</th>
        <th class="price">金额</th>
        <th>操作</th>
    </tr>
    <!-- 模版数据 -->
    <tr th:each="order,stat:${orderList}">
        <td th:text="${stat.index + 1}">1</td>
        <td th:text="${order.orderNo}">P001</td>
        <td th:text="${order.orderType}">堂食</td>
        <td th:text="${order.pnum}">1</td>
        <td th:text="${order.cashier}">张三</td>
        <td th:text="${order.orderTime}">
            2018-04-26 14:49:07

            <!-- <%--
            <fmt:formatDate value="${order.orderTime}"
                        pattern="yyyy-MM-dd HH:mm:ss" />
             --%> -->
        </td>
        <td th:text="${order.payTime}">
            2018-04-26 14:49:07
        </td>
        <td th:text="${order.payType}">微支付</td>
        <td th:text="${order.price}">16.0</td>
        <td>
            <a href="#" th:href="@{/order/remove/{id}(id = ${order.id})}">删除</a>
            &nbsp;|&nbsp;
            <a href="#" th:href="@{/order/toUpdate/{id}(id = ${order.id})}">修改</a>
        </td>
    </tr>

</table>
</body>
</html>



